﻿using System.Windows;
using System.Xml.Linq;

using CircumferenceRotatePanel.ViewModels;

using CircumferenceRotatePanelControl.Views;

using SensingPlatform.Foundation.Events;

namespace CircumferenceRotatePanel.Views
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            this.Loaded += MainWindow_Loaded;
        }

        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            (this.DataContext as MainWindowViewModel).RegionManager.RequestNavigate("ContentRegion", nameof(Circumferencel));
        }

        public void Initialize(XElement config)
        {
            if (config != null)
            {
            }
        }

        public void StartPage(string query)
        {
            if (!string.IsNullOrEmpty(query))
            {
                //Output.Text += query + Environment.NewLine;
                SensingPlatformEventHelper.TriggerEvent("", this);
            }
        }

        public void StopPage(string query)
        {
            if (!string.IsNullOrEmpty(query))
            {
                //Output.Text += query + Environment.NewLine;
            }
        }
    }
}
